﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace SolutionFramework.Tests
{
    [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
    public class SLHostService : ISLHostService
    {
        private SilverlightHost frmHost;

        public SLHostService(SilverlightHost frmHost)
        {
            this.frmHost = frmHost;
        }

        public void Navigate(string url)
        {
            frmHost.Navigate(url);
        }

        public void SetTitle(string titleName)
        {
            frmHost.Title = titleName;
        }

        public void RunTest(string testName)
        {
            frmHost.RunTest(testName);
        }

        public void Shutdown()
        {
            frmHost.Shutdown();
        }

        public DateTime Ping()
        {
            return DateTime.Now;
        }
    }
}
